package es.acaixa.agui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.JScrollPane;
import javax.swing.JButton;
import javax.swing.JLabel;

public class FecharConta extends JFrame {

	private JPanel contentPane;
	private JTable table;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					FecharConta frame = new FecharConta();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public FecharConta() {
		setTitle("Contas");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 632, 238);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(10, 11, 473, 107);
		contentPane.add(scrollPane);
		
		table = new JTable();
		scrollPane.setViewportView(table);
		table.setModel(new DefaultTableModel(
			new Object[][] {
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
			},
			new String[] {
				"Mesa", "Valor", "fechar", "10%"
			}
		) {
			Class[] columnTypes = new Class[] {
				Integer.class, Double.class, Boolean.class, Boolean.class
			};
			public Class getColumnClass(int columnIndex) {
				return columnTypes[columnIndex];
			}
		});
		
		JButton btnListar = new JButton("listar");
		btnListar.setBounds(504, 14, 89, 23);
		contentPane.add(btnListar);
		
		JButton btnEncerrar = new JButton("encerrar");
		btnEncerrar.setBounds(504, 48, 89, 23);
		contentPane.add(btnEncerrar);
		
		JLabel lblMesasCadastradas = new JLabel("Mesas cadastradas");
		lblMesasCadastradas.setBounds(10, 136, 105, 14);
		contentPane.add(lblMesasCadastradas);
		
		JLabel lblQtd = new JLabel("qtd");
		lblQtd.setBounds(125, 136, 46, 14);
		contentPane.add(lblQtd);
		
		JLabel lblEmuso = new JLabel("emUso");
		lblEmuso.setBounds(181, 136, 46, 14);
		contentPane.add(lblEmuso);
		
		JLabel lblUso = new JLabel("uso");
		lblUso.setBounds(246, 136, 46, 14);
		contentPane.add(lblUso);
		
		JLabel lblLivre = new JLabel("livre");
		lblLivre.setBounds(302, 136, 46, 14);
		contentPane.add(lblLivre);
		
		JLabel lblLivre_1 = new JLabel("livre");
		lblLivre_1.setBounds(369, 136, 46, 14);
		contentPane.add(lblLivre_1);
		
		JButton btnAdicionar = new JButton("Adicionar");
		btnAdicionar.setBounds(10, 161, 89, 23);
		contentPane.add(btnAdicionar);
		
		JButton btnRemover = new JButton("Remover");
		btnRemover.setBounds(109, 161, 89, 23);
		contentPane.add(btnRemover);
	}

}
